<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateTableRentCircle extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('rent_circle', function(Blueprint $table)
        {
            $table->increments('id')->comment('自增长');
            $table->integer('uid')->comment('用户ID，对应member表id');
            $table->text('text')->comment('发布内容');
            $table->string('url',4096)->nullable()->comment('图片地址');
            $table->string('province')->nullable()->comment('省份');
            $table->string('city')->nullable()->comment('城市');
            $table->string('lng')->nullable()->comment('经度');
            $table->string('lat')->nullable()->comment('纬度');
            $table->string('class')->comment('发布类别: 1我提供 2我需要');
            $table->unsignedInteger('top_end')->nullable()->comment('置顶结束时间');
            $table->unsignedInteger('create_time')->comment('发布时间');
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::drop('rent_circle');
    }
}
